package com.dyw.democonsumer.controller;

import com.dyw.demoapi.dto.MailDTO;
import com.dyw.demoapi.service.MailUserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.cuit.epoch.result.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Devil
 * @create 2022-03-05 15:00
 */
@RestController
@RequestMapping("mail")
public class MailController {
    @DubboReference
    MailUserService mailUserService;

    @PostMapping
    public Result<String> sendMail(@RequestBody MailDTO mailDTO) {
        return mailUserService.sendMail(mailDTO);
    }
}
